﻿
<link rel="stylesheet" href="<?=static_url('css')?>font-awesome.css" />
<link rel="stylesheet" href="<?=static_url('css')?>daterangepicker.css" />

<div class="contentpanel panel-email">
  <div class="col-sm-9 col-lg-12">

      <div class="">
          <div class="">

              <h5 class="subtitle mb5">任务列表</h5>

              <div class="table">
                  
                  <div style="float:left;display: inline-block;line-height:40px;height:40px;margin-left: 5px">
                    
                    
                    <span style="height:40px;line-height:40px">总共<?=$article['data']['hits']?>条数据</span>
                  </div>
                  <table class="table" id="articleTest" data-m="<?=$class_id?>">
                    <tbody>
            <?php if (!empty($article['data']['hits'])):?>
            <tr>
              <td>标题</td>
              <td>时间</td>
            </tr>
            </tbody>
            <tbody style="height:480px">

              <!-- <?php foreach ($article['data']['data'] as $val):?> -->
              <tr>
                <td>
                  <a href="/opinion/snapshot?client_id=<?=$val['_source']['client_id']?>&uuid=<?=$val['_source']['uuid']?>&sdate=<?=$val['_source']['snatch_time']?>&media_type=<?=$val['_source']['media_type']?>" target="_blank"><?=$val['_source']['title']?></a>
                </td>
                <td>
                  <?=$val['_source']['pubdate']?>
                </td>
              </tr>
              <!-- <?php endforeach;?> -->
                      </tbody>
          <?php else:?>
              <tr>
                <td>暂时没有数据</td>
              </tr>
          <?php endif;?>
                  </table>
                  <div class="pagination">
                    <?= $this->pagination->create_links()?>
                  </div>

              </div><!-- table-responsive -->

          </div><!-- panel-body -->
      </div><!-- panel -->

  </div><!-- col-sm-9 -->
</div>
<script src='<?=static_url('js')?>common.js?ver=1'></script>
<script src="<?=static_url('js')?>date-time/moment.js" type="text/javascript"></script>
<script type="text/javascript" src="<?=static_url('js')?>date-time/daterangepicker.zh-CN.js?ver=1"></script>
<script type="text/javascript" src="<?=static_url('js')?>date-time/daterangepicker.js?ver=1"></script>


<script type="text/javascript">
  $(function() {
    $('.pagination li a').click(function () {
      showLoader();
    var page = $(this).data('ci-pagination-page');
    var id = $('#articleTest').data('m');
    var url = '/opinion/opinion_test/'+ (page - 1) * 10 +'?id=' + id + '&page_num=' + (page - 1);
    var stime = $('#beginTime').val();
    var etime = $('#endTime').val();
    if (stime != '') {
      url += '&stime=' + stime;
    }
    if (etime != '') {
      url += '&etime=' + etime;
    }
    $('#showModal3 .modal-content').load(url, '', function () {
      hideLoader();
    });
    return false;
  })
    
});
/**
* 清除时间
*/
function begin_end_time_clear() {
  $('#dateTimeRange').val('');
  $('#beginTime').val('');
  $('#endTime').val('');
}
</script>
